<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>喜乐康智能家居系统</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%> 
	<script type="text/javascript">
		var scenePage = <s:property value="currentPage" />;
		function sceneUsePage(upDown,key){
			if(upDown=='up'){
				if(scenePage==1) return ;
				if(key=='down'){
					$(".scene_use_img_left_up").css("background-image","url('<%=basePath%>resource/room_up_press.png')");
				}else if(key=='up'){
					scenePage-=1;
					$(".scene_use_img_left").load("<%=basePath%>scene!sceneList.do?currentPage="+scenePage);;
				}
			}else if(upDown=='down'){
				if(scenePage==<s:property value="totalPage" />) return ;
				if(key=='down'){
					$(".scene_use_img_left_down").css("background-image","url('<%=basePath%>resource/room_down_press.png')");
				}else if(key=='up'){
					scenePage+=1;
					$(".scene_use_img_left").load("<%=basePath%>scene!sceneList.do?currentPage="+scenePage);
				}
			}
	    }
	</script>
  </head>
  
  <body>
  	<div class="scene_use_img_left_list">
		<ul>
			<s:iterator value="sceneList" id="scene">
				<li  class="scene_use_img_left_list_ul_li" id="scene_use_img_left_list_ul_li<s:property value="sceneId"/>"  onclick="sceneUsePress('<s:property value="sceneId"/>')">
					<s:property value="sceneName"/>
				</li>
			</s:iterator>
			
		</ul>
	</div>
	<div class="scene_use_img_left_up_down">
		<div class="scene_use_img_left_up" onmousedown="sceneUsePage('up','down')" onmouseup="sceneUsePage('up','up')"></div>
		<div class="scene_use_img_left_down" onmousedown="sceneUsePage('down','down')" onmouseup="sceneUsePage('down','up')"></div>
	</div>
  </body>
</html>
